package service.user;

import java.util.List;

import base.entity.Page;
import entity.user.User;

public interface IUserService {

	/**
	 * 登录
	 * 
	 * @param name
	 *            用户名
	 * @param pwd
	 *            密码
	 * @return
	 * @throws Exception
	 */
	public User login(String account, String pwd) throws Exception;

	/**
	 * 增加1个用户
	 * 
	 * @param user
	 * @return
	 * @throws Exception
	 */
	public User addSingleUser(User user) throws Exception;

	/**
	 * 修改用户
	 * 
	 * @param user
	 * @return
	 * @throws Exception
	 */
	public User UpdateUser(User user) throws Exception;

	/**
	 * 修改用户附件
	 * 
	 * @param user
	 * @param fileId
	 * @return
	 * @throws Exception
	 */
	public User updateUserAttachment(User user, String id, String name) throws Exception;

	/**
	 * 根据用户ID查询用户
	 * 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public User getUserById(String id) throws Exception;

	/**
	 * 分页查询所有用户
	 * 
	 * @param pageNo
	 * @param pageSize
	 * @return
	 * @throws Exception
	 */
	public Page<User> getUsersByPageAndSize(Integer pageNo, Integer pageSize) throws Exception;

	/**
	 * 根据ID集合查询用户
	 * 
	 * @param ids
	 * @return
	 * @throws Exception
	 */
	public List<User> getUsersByIds(List<String> ids) throws Exception;
}
